﻿namespace MicroCloud.Message.Database
{
    /// <summary>
    /// 模板消息实体映射配置
    /// </summary>
    public class TemplateMessageConfiguration : EntityTypeConfigurationBase<TemplateMessage, long>
    {
        #region "方法"
        #region "重写以实现实体类型各个属性的数据库配置"
        /// <summary>
        /// 重写以实现实体类型各个属性的数据库配置
        /// </summary>
        /// <param name="builder">实体类型创建器</param>
        public override void Configuration(EntityTypeBuilder<TemplateMessage> builder)
        {
            //builder.HasIndex(m => m.Method).HasDatabaseName("IX_TemplateMessage_Method").IsUnique(false);
            builder.HasIndex(m => m.Method).SetIndex("Method");

            ConfigurationAppend(builder);
        }
        #endregion

        #endregion

    }

}
